<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer />
    <TodayRecommend></TodayRecommend>
    <Rank />
    <Like></Like>
    <Floor v-for="(floor,index) in floorList" :key="floor.id" :floor="floor"></Floor>
    
    <Brand />
  </div>
</template>

<script>

//辅助函数获取Floor数据
import ListContainer from "./listContainer";
import TodayRecommend from "./todayRecommend/";
import Rank from "./rank";
import Like from "./like";
import Floor from "./floor";
import Brand from "./brand";


import {mapState} from 'vuex';
export default {
  name: "Home",
  components: {
    ListContainer,
    TodayRecommend,
    Rank,
    Like,
    Floor,
    Brand,
  },
    //父组件挂载完毕
  mounted(){
   this.$store.dispatch('floorList');
   
  },
  computed:{
    ...mapState({
      floorList:state=>state.home.floorList,
    })
  }
};
</script>

<style scoped></style>
